home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 4 / MacMania 4.toast / / Tools&Utilities / john's calculator / john's calculator readme < prev   
Text File  |  1996-04-24  |  10KB  |  284 lines

  1. john's calculator:
  2. written by John Wilhelm using Mops 2.7
  3. version 1.0
  4. copyright © 1996, John Wilhelm
  5.  
  6.  
  7. Contact Information:
  8. wilhelm@gate.net
  9. wilhelmj@email.spjc.cc.fl.us
  10.  
  11.  
  12. Description:
  13. john's calculator is a simple, powerful, and fast keyboard-based calculator. Expressions are entered as by hand, using either the keyboard or calculator buttons. Standard editing commands like cut, copy, and paste are fully supported. Variables can be used to simplify expressions.
  14.  
  15.  
  16. For users of previous versions:
  17. •  The file format used in previous versions has been changed slightly in version 1.0. This may lead to the loss of the first line of a file created by a previous version when read by version 1.0.
  18.  
  19. •   The icons used by john's calculator have been changed in version 1.0. If you have already installed an old version of john's calculator to use the new icons you need to rebuild you Macintoshes Desktop (hold +option at startup).
  20.  
  21. •  The round & truncate functions now round/truncate to a given number of decimal places.
  22.  
  23.  
  24. Installation:
  25. Copy the file "john's calculator" to where you want it. That's it.
  26.  
  27.  
  28. How to use john's calculator:
  29. •  Enter an expression on a line by itself.
  30.  
  31. •  Press the ENTER key to evaluate the line, regardless of where the cursor is in the line.
  32.  
  33. Note that you must press the ENTER key to evaluate an expression - the RETURN key inserts a carriage return but does not evaluate.
  34.  
  35. You can return to a previous line, edited it, press the ENTER key and the changed line will be evaluated.
  36.  
  37. Some examples:
  38.  
  39. 2(2+3)                         enter 2(2+3) then press the ENTER key
  40.  10                              the line is evaluated and the value returned on the next line
  41.  
  42. 2e2^2                          this is the same as 200^2 (2e2 is 2x10^2)
  43.  40000
  44.  
  45. 5log(2^5)                    this is the same as 5(log(2^5))
  46.  7.52575 
  47.  
  48. 5log2^5                       this is the same as 2((log2)^5)
  49.  0.01236
  50.  
  51. 10->x                          store 10 in the variable named x
  52.  10
  53. 20->y                          store 20 in the variable named y
  54.  20
  55. 2x+3y                          this is the same as 2(10)+3(20)
  56.  80
  57.  
  58. -1-9->x                      now store -1-9 in x
  59.  -10
  60. 2x+3y                         now this is the same as 2(-10)+3(20)
  61.  40
  62.  
  63. :5->x                           store 5 in x, ":" stops the value from being shown
  64. :2->y                           store 2 in y
  65. x^2+y^2                        this is the same as 5^2+2^2
  66.  29
  67.  
  68. {5->x                           evaluate lines until "}" or end of file is reached 
  69. 2x^2+3x+2                   cursor must be in line containing "{"
  70. }                                                                    " }" must be the first (non-space) character on the line
  71.  67                               value returned is that of last line evaluated
  72.  
  73. {                                  similar example
  74. 2->x
  75. 3x+2->y                       use the RETURN key to enter other lines
  76. 2y
  77. }
  78.  16
  79.  
  80. :{1->y 
  81. 2y->x
  82. }                                  ":" stops the value from being shown
  83.  
  84. Now we could return to the line ":5->x", change the 5 to a 0 and press the ENTER key. This would change the value of x to 0.
  85. If we then return to the line "x^2+y^2" and press the ENTER key, 4 is returned (0^2+2^2).
  86.  
  87. 1+2
  88.  3
  89. ans                                                            enter ans then press the ENTER key
  90.  3                                the last answer, 3, is returned
  91. 1+ans                          this is the same as 1+3 since 3 was the last answer
  92.  4
  93.  
  94. 5-2
  95.  3
  96. +2                                this is the same as 3+2 since the previous answer is used when not
  97.  5                                 enough arguments are given on a line
  98. ^3                                 this is the same as 5^3
  99.  125
  100.  
  101. 60!                               60! is too big for decimal display, so it's shown in scientific display
  102.  8.32099e+81              regardless of radio button setting
  103.  
  104. Most operations which take two arguments can be enter as opn(arg1,arg2) or arg1opnarg2.  Usually one of the two forms is much clearer.
  105.  
  106. examples:  
  107. gcd(10,2) and 10gcd2 both return 2 (the greatest common divisor)
  108. 10^2 and ^(10,2) both return 100
  109.  
  110. There is a complete list of operations below.
  111.  
  112.  
  113. Buttons:
  114. Input buttons:
  115. All operations are available on calculator input buttons.
  116.  
  117. Radio buttons:
  118. •   Mode group  -  sets mode to radians or degrees
  119. •   Display group  -  sets calculator to display answer in decimal or scientific notation form
  120. •   Level group  -  sets which level of input buttons is shown
  121.  
  122. Enter button:
  123. Same as pressing the ENTER key.
  124.  
  125.  
  126. Menus:
  127. The "File" and "Edit" menus work in the usual fashion.
  128.  
  129. Variables menu:
  130. Show - shows all variables and values
  131. Clear All - clears all variables (so no variables are stored)
  132. The variable menu is not available unless a variable is defined.
  133.  
  134. Decimal menu:
  135. Floating  -  use floating decimal in displaying answer
  136. Fixed  -  use fixed decimal in displaying answer
  137. 0-6  -  number of decimal places to use  in displaying answer
  138.  
  139.  
  140. Evaluation Errors:
  141. • If john's calculator can't understand an operation it will highlight the first thing it doesn't understand (and beep at you).
  142.  
  143. • If there are not enough arguments for the operations in an expression an alert box will pop
  144. up and say so.
  145.  
  146. •  If a function is given a bad argument an alert box will pop up and hiss at you.
  147.  
  148.  
  149. Gotchas:
  150. •  You must use the ENTER key, not the RETURN key, to evaluate a line.
  151.  
  152. •   Rules about variable names.
  153.         -  Variable names are not case sensitive. So "x" and "X" are the same variable names.
  154.         -  Variable names can contain spaces except at the beginning. So "x1" and "x1   " are
  155.         different variables. But "2->    x" would store 2 in the variable named "x".
  156.         -  Variable names can be any length. So "my variable" is a valid variable name.
  157.         -  Just about any character is valid in variable name. So "#$-" is ok.
  158.  
  159. •  When evaluating a line john's calculator checks for variable names before anything else.
  160. You can use a variable named "log" if you want but this carries obvious risks.
  161.  
  162. •   Up to 100 variables can be stored. You can clear all variables using the "Clear All" 
  163. command of the "Variables" menu or clear individual variables using the "<-" operator.
  164.  
  165. •   The calculator only ask if you want to save changes if you are working with a named
  166. file.
  167.  
  168. •    ":" must be the first (non-blank) character in a line.
  169.  
  170. •   ":" can't appear between "{" and "}".
  171.  
  172. •   In multiline eval the cursor must be in line containing "{" when the ENTER key is pressed.
  173.  
  174. •   "{" can be preceeded only by ":" (and blanks) in a line.
  175.  
  176. •   "}" must be the first (non-blank) character in a line.
  177.  
  178. •   In decimal display mode answers are rounded after 19 digits.
  179.  
  180.  
  181. Operations:
  182. Here is a listing of the operations john's calculator understands.
  183.  
  184. +          addition
  185. -          subtraction
  186. *          multiplication
  187. /          division
  188. ^           exponentiation
  189.  
  190. ln         natural logarithm
  191. log       logarithm base 10
  192. lognx   logarithm base n of x
  193.            lognx(2,16)   returns 4
  194. ()         parentheses
  195. ,           separates arguments
  196.  
  197. sin       sine
  198. cos       cosine
  199. tan       tangent
  200. cot       cotangent
  201. ans       last answer returned
  202.  
  203.  
  204. sqrt      square root
  205. %          percent
  206.             5%20   returns 25 (since 5 is 25% of 20)
  207. 1/x       reciprocal
  208. //         modulus (remainder)
  209.             16//7    returns 2 (since the remainder for 16/7 is 2)
  210. ^(1/)     arbitrary root
  211.             16^(1/4)    returns 2 (since the principle 4th root of 16 is 2)
  212.  
  213. {}         multiline evaluation
  214. :           don't return value (must be at start of line)
  215. ->         store value in variable
  216. <-         clear variable name
  217.             <-x    returns value in x and clears x from storage
  218. r2d       change radians to degrees
  219.  
  220. arcSin  arcSine
  221. arcCos  arcCosine
  222. arcTan  arcTangent
  223. arcCot  arcCotangent
  224. d2r       change degrees to radians
  225.  
  226.  
  227. mPn      permutations of n things taken from m things
  228.              mPn(10,2) or 10mPn2   returns 90
  229. mCn      combinations of n things taken from m things
  230.              mCn(10,2) or 10mCn2   returns 45
  231. !            factorial
  232. gcd       greatest common divisor
  233.                         gcd(200,60)   returns 20
  234. lcm       least common multiple
  235.  
  236. pi           π
  237. e             the natural base e
  238. round      round to given decimal place
  239.                             round(2.514, 0)   returns 3
  240. trunc      truncates to given decimal place
  241.                             trunc(2.514, 0)   returns 2
  242. abs         absolute value
  243.  
  244. csc         coSecant
  245. sec         secant
  246. sinh        hyperbolic sine
  247. cosh       hyperbolic cosine
  248. tanh        hyperbolic tangent
  249.  
  250.  
  251. Preferences file:
  252. The position of the percenter window and the "Decimal" menu settings are stored in the "percenter Preferences" file and used the next time percenter is launched.
  253.  
  254. This file is located in the "Preferences" folder by default. The "Preferences" folder is normally located in the "System" folder.
  255.  
  256.  
  257. Known bugs:
  258. None (oh boy).
  259.  
  260.  
  261. Version History:
  262. 0.0b - first beta release (22 Jan 1996)
  263.  
  264. 0.1b - 2nd beta release (24 Feb 1996)
  265.     fixed some problems with file handling
  266.     cleaned-up resizing
  267.     cleaned/fixed some internals
  268.  
  269. 1.0 - (24 April 1996)
  270.   added "Decimal" menu
  271.     added use of preference file
  272.     added multiline evaluation
  273.     added check for bad function arguments
  274.     round now rounds to given decimal place (rather than always to 0 decimal places)
  275.     redesigned icons
  276.     cleaned-up zoom
  277.  
  278.  
  279. Standard Stuff:
  280. Although copyrighted, john's calculator is freeware and may be distributed freely as long as this file is included. However, ownership of and interest in this software shall remain with John Wilhelm.
  281.  
  282. This software is provided “as is” without warranty of any kind.  The entire risk as to the results of using this software lies entirely with the user.
  283.  
  284. In no event shall the author be liable for any damages arising out of the use or inability to use this software.